package com.ruoyi.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 设备维护记录对象 requipment_maint_rec
 * 
 * @author qiancheng
 * @date 2025-09-29
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("requipment_maint_rec")
public class RequipmentMaintRec extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 台架设备ID */
    @Excel(name = "台架设备ID")
    @TableField(value = "requipment_id")
    private String requipmentId;

    /** 所属台架ID */
    @Excel(name = "所属台架ID")
    @TableField(value = "rack_id")
    private String rackId;

    /** 记录年份 */
    @Excel(name = "记录年份")
    @TableField(value = "record_year")
    private Long recordYear;

    /** 记录月份 */
    @Excel(name = "记录月份")
    @TableField(value = "record_month")
    private Long recordMonth;

    /** 记录日期 */
    @Excel(name = "记录日期")
    @TableField(value = "record_day")
    private Long recordDay;

    /** 维护时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "维护时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(value = "maintenance_time")
    private Date maintenanceTime;

    /** 维修内容 */
    @Excel(name = "维修内容")
    @TableField(value = "repair_reason")
    private String repairReason;

    /** 维护人 */
    @Excel(name = "维护人")
    @TableField(value = "maintenance_staff")
    private String maintenanceStaff;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date endTime;

    /** 设备名称 */
    @TableField(exist = false)
    private String equipmentName;

}
